//
//  ZMDemoVC_01.m
//  testDemo
//
//  Created by 赵林瑞 on 16/5/11.
//  Copyright © 2016年 RZOL. All rights reserved.
//

#import "ZMDemoVC_01.h"
#import "ZMContactVC.h"
#import "ZMCityListVC.h"


#import "ZMYinShiAnimationVC.h"
#import "ZMBaseTVController.h"
#import "ZMTextField.h"

#import "ZMPinYinController.h"

#import "GTPageController.h"
#import "ZMPage1Controller.h"
#import "ZMPage2Controller.h"

@interface ZMDemoVC_01 ()

@end

@implementation ZMDemoVC_01

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupUI];
}

- (void)setupUI {
    
}

// 跳转到通讯录
- (IBAction)click01:(id)sender {
    [self.navigationController pushViewController:[ZMContactVC new] animated:YES];
}

// 城市定位
- (IBAction)click02:(id)sender {
    [self.navigationController pushViewController:[ZMCityListVC new] animated:YES];
}

// 轮播图
- (IBAction)click03:(id)sender {
}

// pageController
- (IBAction)click04:(id)sender {
    GTPageController *fangDaiVC = [self getDefaultController];
    [self.navigationController pushViewController:fangDaiVC animated:YES];
}

- (GTPageController *)getDefaultController{
    NSMutableArray *viewControllers = [[NSMutableArray alloc] init];
    NSMutableArray *titles = [[NSMutableArray alloc] init];
    for (int i = 0; i < 2; i++) {
        Class vcClass;
        NSString *title;
        switch (i) {
            case 0:
                vcClass = [ZMPage1Controller class];
                title = @"商业贷款";
                
                break;
            case 1:
                vcClass = [ZMPage2Controller class];
                title = @"公积金贷款";
                break;
            default:
                
                break;
        }
        [viewControllers addObject:vcClass];
        [titles addObject:title];
        
    }
    GTPageController *pageVC = [[GTPageController alloc] initWithViewControllerClasses:viewControllers andTheirTitles:titles];
    
    pageVC.menuHeight = 40 *SCREEN_SCALE;
    pageVC.menuViewStyle = GTMenuViewStyleLine;
    pageVC.pageAnimatable = YES;
    pageVC.postNotification = YES;
    //pageVC.menuY = 64;
    
    pageVC.progressColor = MTRGBColor(35, 167, 241);;
    pageVC.titleColorSelected = MTRGBColor(35, 167, 241);
    pageVC.titleColorNormal = MTRGBColor(51, 51, 51);
    pageVC.menuItemWidth = PMWIDTH / 3;
    
    return pageVC;
}

// 隐式动画
- (IBAction)Click05:(id)sender {
    [self.navigationController pushViewController:[ZMYinShiAnimationVC new] animated:YES];
}


// tableView 的自定义cell高度
- (IBAction)Click06:(id)sender {
    [self.navigationController pushViewController:[ZMBaseTVController new] animated:YES];
}
- (IBAction)Click7:(id)sender {
    [self.navigationController pushViewController:[ZMTextField new] animated:YES];
}
- (IBAction)pinyinClick:(id)sender {
    [self.navigationController pushViewController:[ZMPinYinController new] animated:YES];
}
@end
